home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / examples / xprintf.c < prev   
Encoding:
C/C++ Source or Header  |  1994-03-13  |  919 b   |  33 lines

  1. /*
  2. ** XPRINTF.C: Displays a window with information about the
  3. ** current display configuration.
  4. */
  5.  
  6. #include <pictor.h>
  7.  
  8. void main()
  9. {
  10.    VIDEOSTRUCT vstruct;
  11.  
  12.    /* initialize library */
  13.    initvideo();
  14.    getvconfig(&vstruct);
  15.  
  16.    /* create window and write information */
  17.    wopen(6,11,11,60,foreback(BOLD+WHITE,BLUE),0x00);
  18.    xprintf(wputs,"Video segment: %04X\n",vstruct.segment);
  19.    xprintf(wputs,"Snow checking: %s\n",
  20.       (vstruct.snowcheck) ? "On" : "Off");
  21.    xprintf(wputs,"Text rows: %d\n",vstruct.rows);
  22.    xprintf(wputs,"Text columns: %d\n",vstruct.columns);
  23.    xprintf(wputs,"Video mode: %d\n",vstruct.mode);
  24.    xprintf(wputs,"Display page: %d\n",vstruct.page);
  25.    xprintf(wputs,"Color support: %s\n",
  26.       (vstruct.colorsupport) ? "Yes" : "No");
  27.    wputs("\nPress any key...");
  28.  
  29.    /* wait for user to press a key and close the window */
  30.    kbdread();
  31.    wclose();
  32. }
  33.